home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / us20src.zip / DDEF.H < prev    next >
C/C++ Source or Header  |  1991-10-24  |  4KB  |  118 lines

  1. /*    DDEF:    Global definitions for MicroSPELL 1.0
  2.         Spell Checker and Corrector
  3.  
  4.         (C)opyright May 1987 by Daniel Lawrence
  5.         All Rights Reserved
  6. */
  7.  
  8. /* some global fuction declarations */
  9.  
  10. char *malloc();
  11. char *strcpy();
  12. char *strcat();
  13. char *strncpy();
  14. char *itoa();
  15. FILE *popen();
  16. WORD *getword();
  17. char *flook();
  18. char *lastmword();
  19. char *nxtmword();
  20. char *fgets();
  21. char *gcword();
  22. int lowcmp();
  23.  
  24. #ifdef    maindef
  25.  
  26. /* for MAIN.C */
  27.  
  28. int numwords = 0;            /* current # of source words loaded */
  29. int totwords = 0;            /* total number of words processed */
  30. int prowords = 0;            /* total processed words */
  31. int badwords = 0;            /* number of mismatched words */
  32. WORD *sword[MAXWORDS+1];        /* current source word list */
  33.  
  34. int outnum = -1;            /* current output source file # */
  35. FILE *outfile = NULL;            /* mispelled word temp file */
  36.  
  37. int sfnum = -1;                /* current source file ordinal # */
  38. FILE *srcfile = NULL;            /* current source file pointer */
  39. int srcline = 0;            /* current source line number */
  40. char iline[MAXLINE];            /* current input line */
  41. char *iptr;                /* current ptr into line */
  42.  
  43. #if    CMPRS
  44. char *mdfile = "dict.dct";        /* main dictionary text file */
  45. #else
  46. char *mdfile = "dict.txt";        /* main dictionary text file */
  47. #endif
  48. FILE *mdptr = NULL;            /* ptr to main dictionary */
  49. long letter_offset[ALPHASIZE];        /* offsets in file to letters */
  50. unsigned char lcase[128];        /* lower case table (quick!) */
  51.  
  52. char *comlist = "common.txt";        /* most common word list file */
  53. char userlist[NFILEN] = "";        /* First user word lsit file */
  54. int commonf = FALSE;            /* common dictionary loaded flag */
  55. int numcom = 0;                /* # of common words */
  56. int numfiltr = 0;            /* number of filter words */
  57. char *cword[MAXCOM+1];            /* list of common words */
  58.  
  59. int numspell = 0;            /* number of files to spell */
  60. char splname[MAXSPELL][NFILEN];        /* name of files to spell */
  61.  
  62. int (*comp)() = NULL;            /* current comparison function */
  63. char hivalue[] = { 0xff, 0};        /* HIGH value string */
  64.  
  65. int swdebug = FALSE;            /* debugging flag */
  66. int swemacs = FALSE;            /* use MicroEMACS to correct */
  67. int swwords = FALSE;            /* output a word list */
  68.  
  69. #if    RAMSIZE
  70. long envram = 0;            /* # of bytes malloced */
  71. #endif
  72. #else
  73.  
  74. /* for all the other .C files */
  75.  
  76. extern int numwords;            /* current # of source words loaded */
  77. extern int totwords;            /* total number of words processed */
  78. extern int prowords;            /* total processed words */
  79. extern int badwords;            /* number of mismatched words */
  80. extern WORD *sword[MAXWORDS];        /* current source word list */
  81.  
  82. extern int outnum;            /* current output source file # */
  83. extern FILE *outfile;            /* mispelled word temp file */
  84.  
  85. extern int sfnum;            /* current source file ordinal # */
  86. extern FILE *srcfile;            /* current source file pointer */
  87. extern int srcline;            /* current source line number */
  88. extern char iline[NSTRING];        /* current input line */
  89. extern char *iptr;            /* current ptr into line */
  90.  
  91. extern char *mdfile;            /* main dictionary text file */
  92. extern FILE *mdptr;            /* ptr to main dictionary */
  93. extern long letter_offset[];        /* offsets in file to letters */
  94. extern unsigned char lcase[];        /* lower case table (quick!) */
  95.  
  96. extern char *comlist;            /* most common word list file */
  97. extern char userlist[];            /* First user word lsit file */
  98. extern int commonf;            /* common dictionary loaded flag */
  99. extern int numcom;            /* # of common words */
  100. extern int numfiltr;            /* number of filter words */
  101. extern char *cword[];            /* list of common words */
  102.  
  103. extern int numspell;            /* number of files to spell */
  104. extern char splname[MAXSPELL][NFILEN];    /* name of files to spell */
  105.  
  106. extern int (*comp)();            /* current comparison function */
  107. extern char hivalue[];            /* HIGH value string */
  108.  
  109. extern int swdebug;            /* debugging flag */
  110. extern int swemacs;            /* use MicroEMACS to correct */
  111. extern int swwords;            /* output a word list */
  112.  
  113. #if    RAMSIZE
  114. extern long envram;            /* # of bytes malloced */
  115. #endif
  116. #endif
  117.  
  118.